home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
comm
/
jmod311.zip
/
JMODEM.H
< prev
next >
Wrap
Text File
|
1992-02-02
|
26KB
|
339 lines
/****************************************************************************/
/* FILE JMODEM.H */
/* Created 11-JAN-1990 Richard B. Johnson */
/* 405 Broughton Drive */
/* Beverly, Massachusetts 01915 */
/* BBS (508) 922-3166 */
/* */
/* This program requires about 67k of free RAM to execute properly. */
/* If you have 66k or less, it will execute, but the screens will */
/* not be written or replaced properly. If you have only 64k, the */
/* program will exit with an error message. */
/* */
/* Revision History: */
/* V3.00 Beta test 11-FEB-1990 Richard B. Johnson */
/* V3.01 First release 18-FEB-1990 Richard B. Johnson */
/* V3.02 Revised 19-FEB-1990 Richard B. Johnson */
/* */
/* (1) A bug in MicroSoft _calloc() allocates overlapping */
/* buffers so data files were getting corrupted. I had */
/* used both _calloc() and _malloc() at the same time and */
/* they didn't like it. I changed the memory allocation */
/* to _malloc() only and it seems to work okay. */
/* */
/* (2) While debugging, I found some structures I didn't need and */
/* removed them. Changed some code to accommodate. */
/* */
/* (3) Added a file-size during downloads. */
/* */
/* (4) Changed code in the data encoding (compression) routine */
/* in an attempt to speed it up. */
/* */
/* V3.03 Revised 20-FEB-1990 Richard B. Johnson */
/* */
/* (5) Fixed bug in compression routine where the loop wasn't */
/* terminating properly, adding random characters. Bug was */
/* created during V3.02 change. */
/* */
/* V3.04 Revised 27-FEB-1990 Richard B. Johnson */
/* */
/* (1) Modified the block-size routine and the receive-block */
/* routine in an attempt to improve the noise immunity. */
/* Does not abort even if you whistle into the telephone */
/* during uploads and downloads. Waits 5 seconds to clear */
/* the interrupt buffer when a bad block-size is received. */
/* */
/* (2) Added a 1/2 second wait for modem status when opening */
/* channel. This might accommodate slow modems response to */
/* RTS. */
/* */
/* V3.05 Revised 22-MAR-1990 Richard B. Johnson */
/* */
/* (1) Removed _sprintf() runtime library calls to shorten */
/* the code. Saved about 4k. */
/* */
/* (2) Removed extra spaces in the signon-logo to shorten */
/* the program size. */
/* */
/* (3) Changed the method of creating a fixed-length string */
/* for both the block size and cps numbers which saved about */
/* 800 bytes of program size. */
/* */
/* (4) Changed numerous array indexes in JMODEM_F.C to pointers */
/* to reduce code size. Saved a few hundred bytes and should */
/* improve speed of screen output. */
/* */
/* (5) Created a local _puts() routine which saved over 6k from the */
/* MicroSoft C runtime library version. (JMODEM_F.C) */
/* */
/* V3.06 Revised 07-APR-1990 Richard B. Johnson */
/* */
/* (1) Put the filename text into the syst structure as a pointer */
/* to char. This allowed me to save 56 bytes of code and now */
/* only two parameters are passed to the _screen() function. */
/* */
/* (2) Modified the syst structure and supporting code. */
/* */
/* (3) Moved all external data and functions to the JMODEM.H file. */
/* */
/* (4) Moved _disp() "usage" module to JMODEM_F.C */
/* */
/* (5) Changed arrays in JMODEM_B.C to pointers to reduce code- */
/* size. Eliminated _strcpy() from the command-line parsing */
/* routines. Brought the code-size to less than 12,000 bytes. */
/* */
/* (6) Reduced the code-size in the _encode(), _decode(), and */
/* _crc() routines in JMODEM_D.C. Removed shifts to improve */
/* speed and replaced the shifts with pointers for altering */
/* portions of the strings. */
/* */
/* (7) Made a _cancel() routine in JMODEM_A.C to send ^Xes upon */
/* abort. */
/* */
/* (8) Removed the bit being set "OUT 1" via the modem-control */
/* register in the "open" routine in JMODEM_E.C. This was */
/* causing some internal modems to lock up as they use this */
/* bit for something. "OUT 2" is used to enable IRQ on most */
/* clone RS-232 boards and modems. The Heathkit HZ-100 boards */
/* will probably not work anymore because they use "OUT 1". */
/* */
/* V3.07 Revised 03-MAY-1990 Richard B. Johnson */
/* */
/* (1) Rewrote code to remove the requirement for a file buffer. */
/* This means that th